package com.eleventwelve.iris.service.impl;

import org.opentides.bean.user.SessionUser;
import org.opentides.service.impl.BaseCrudServiceImpl;
import org.opentides.util.SecurityUtil;

import com.eleventwelve.iris.entity.IrisUser;
import com.eleventwelve.iris.service.IrisUserService;

public class IrisUserServiceImpl extends BaseCrudServiceImpl<IrisUser> implements IrisUserService {
	public IrisUser getCurrentUser() {
		SessionUser sessionUser = SecurityUtil.getSessionUser();
		if (sessionUser != null) {
			return load(sessionUser.getId());
		}
		return null;
	}
}
